from panda3d.core import *
import random, sys, os, math

class Camera():
     def __init__(self):
         self.pos = base.camera.getPos()
         self.heading = base.camera.getH()
         self.pitch = base.camera.getP()
         base.camLens.setFov(75)
         base.camLens.setNearFar(0.01, 500)
         self.sensitivity = 65.0
         self.movespeed = 10
         base.disableMouse()
         
     def Update(self):
        if self.heading > 360:
            self.heading = 0
        elif self.heading < 0:
            self.heading = 360
        if self.pitch > 90:
            self.pitch = 90
        elif self.pitch < -90:
            self.pitch = -90
        self.pos = base.camera.getPos(render)